﻿using Entity.Models.Entities;
using Entity.Models.vo;
using Microsoft.AspNetCore.Http;
using RepositorySys.Models;
using System;
using System.Collections.Generic;

namespace IBLL
{
    /// <summary>
    /// 用户模块接口
    /// 
    /// 作用：定义方法规则
    /// </summary>
    public interface IUserBLL
    {
        /// <summary>
        /// 用户列表、搜索
        /// </summary>
        /// <returns></returns>
        List<UserInfoDTO> userShow(string userName, string page, string limit, out int cont);

        /// <summary>
        /// 添加用户信息
        /// </summary>
        /// <param name="userInfo"></param>
        /// <returns></returns>
        bool AddUser(UserInfo userInfo);

        /// <summary>
        /// 根据账号查询用户信息
        /// </summary>
        /// <param name="account"></param>
        /// <returns></returns>
        UserInfo byUserUser(string account);

        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="userIds"></param>
        /// <returns></returns>
        bool DatateUsers(List<string> userIds);

        /// <summary>
        /// 删除用户信息
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        bool DatateUser(string userId);

        /// <summary>
        /// 修改用户信息
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        bool UpdateUser(UserInfo user);

        /// <summary>
        /// 全部主管信息
        /// </summary>
        /// <returns></returns>
        object getLeader(string departmentid);



        /// <summary>
        /// 根据账号id查询用户信息
        /// </summary>
        /// <param name="userid"></param>
        /// <returns></returns>
        UserInfoVo getbyUserId(string userid);

        /// <summary>
        /// 修改用户密码
        /// </summary>
        /// <param name="old_password">旧密码</param>
        /// <param name="new_password">新密码</param>
        /// <param name="again_password">确定密码</param>
        /// <returns></returns>
        bool UpdataPassword(string old_password, string new_password, string again_password, string userid);

        /// <summary>
        /// 上传头像
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="file"></param>
        /// <returns></returns>
        string UploadAvatar(string userId, IFormFile file );

        /// <summary>
        ///获取用户信息(头像)
        /// </summary>
        /// <returns></returns>
        object getUserIcon(string userId);
    }
}
